package cn.remexs.flink.udf.geo;

import cn.remexs.flink.udf.GeoUtils;
import org.apache.flink.table.functions.ScalarFunction;

/**
 * 坐标转换
 */
public class TransJson extends ScalarFunction {
    public TransJson() {
    }

    public String eval(String source, String target, String json, Boolean is3D) {
        try {
            if (json == null) return null;
            return GeoUtils.transJson(source, target, json, is3D);
        } catch (Exception e) {
            return null;
        }
    }
}
